import {createRouter, createWebHistory} from "vue-router";

export const constantRoutes = [
    {
        name: "login",
        path: "/",
      
        component: () => import("../components/HelloWorld.vue"),
    },
    {
        path: "/TheWelcome",
        name: "TheWelcome",
        // redirect: "/",
        component: () => import("../views/index.vue"),
        children: [
            {
                path: "table",
                name: "table",
                component: () => import("../views/table.vue"),
            },
        ],
    },
];
const router = createRouter({
    history: createWebHistory(),
    routes: [...constantRoutes],
});


// // 导航守卫 编写拦截的数据参数
// router.beforeEach((to, from) => {
//     // 返回 false 以取消导航
//     return false
// })

export default router;
